for abc in range(100,1000):
    x = abc//100
    y = abc//10%10
    z = abc%10
    n = x**3+y**3+z**3
    if n==abc:
       print(abc)